<extend name="./app/Tpl/Public/template.html" />
<block name="content_body">
	<div class="pad-lr-10">
	    <div style="padding:10px; overflow:hidden;">
	    	<div class="main_top" style="clear:both;"><h4>温馨提示：</h4>
    			<ul>
    				<li class="green">1.所在区域：沙河口区，高新园区等</li>
    				<li class="green">2.供货说明：粮油  冰露 等产品分类或具体产品名称 </li>
    			</ul>
	    	</div>
	    </div>
	    <form name="form_edit" id="form_edit" action="{:U('doUpdBatch')}" method="post">
			<div class="table-list">
				<select name="cate_code" style="width:250px;" class="chosen_search">
					<option value="">全部分类列表</option>
             		<volist name="cateTree" id="val_1">
             			<optgroup label="{$val_1.code}-{$val_1.title}">
   						<volist name="val_1['children']" id="val_2">
							<option value="{$val_2.code}"  <if condition="$val_2['code'] eq $search['cate_code']">selected</if>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$val_2.code}{$val_2.title}</option>								
						</volist>
						</optgroup>
             		</volist>
				</select>
			    <table width="100%" cellspacing="0">
			        <thead>
			            <tr> 
			            	<th width="40">选择</th>
			            	<th width="80">品牌</th>               
			                <th width="100">商品名称</th>
			                <th width="80">规格</th>
			                <th width="80">单位</th>
			                <th width="80">零售价</th>
			                <th width="80">会员价</th>
			                <th width="80">进货价</th>
			      			<th width="100">排序</th>
			            </tr>
			        </thead>
			    	<tbody>
						<volist name="list" id='val'>
							<input type="hidden" value="{$val.id}" name="id[]">
				        <tr>
				        	<td align="center"><input type="checkbox" value="{$val.id}" name="choosedId[]" checked></td>
				        	<td align="center"><input type="text" class="input-text-mid" value="{$val.brand}" name="brand[]"></td>
				        	<td align="center"><input type="text" class="input-text-mid" value="{$val.name}" name="name[]"></td>
				        	<td align="center"><input type="text" class="input-text-mid" value="{$val.spec}" name="spec[]"></td>
				        	<td align="center"><input type="text" class="input-text-sml" value="{$val.spec_unit}" name="spec_unit[]"></td>
				        	<td align="center"><input type="text" class="input-text-sml" value="{$val.price_sale}" name="price_sale[]"></td>
				        	<td align="center"><input type="text" class="input-text-sml" value="{$val.price_vip}" name="price_vip[]"></td>
				        	<td align="center"><input type="text" class="input-text-sml" value="{$val.price_buy}" name="price_buy[]"></td>
				        	<td align="center"><input type="text" class="input-text-sml" value="{$val.ordlist}" name="ordlist[]"></td>	
				        </tr>
				        </volist>
			    	</tbody>
			    </table>
	
			    <div class="btn">
					<input type="button"  name="form_list_btn_add" value="批量保存" onclick="doSubmit()"/>
					<input type="button"  name="form_list_btn_clear" value="全部清空" onclick="document.location.reload()"/>
					<input type="button"  name="form_list_btn_list" value="返回列表" onclick="redirect('{:U('index')}')"/>
					<div id="pages">{$page}</div>
			    </div>
			 </div>
	    </form>
	</div>
<script type="text/javascript" src="__ROOT__/statics/scripts/kindeditor/kindeditor-all-min.js"></script>
<script type="text/javascript">

function doSubmit(){
	$('#form_edit').submit();
}
$(function(){
	
	$.formValidator.initConfig({
		formID:"form_edit",
		wideWord:false,
		submitOnce:true
	});
		
})
</script>
</block>	